package jmine.tec.web.wicket.pages.example.report;

import jmine.tec.report.api.batch.ReportCreator;
import jmine.tec.web.wicket.mock.MockMessageCreator;
import jmine.tec.web.wicket.pages.form.ReportPage;

import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.spring.injection.annot.SpringBean;

import bancosys.tec.exception.MessageCreator;

/**
 * Exemplo de página de relatório.
 * 
 * @author Rafael Volpato
 * @date Nov 10, 2011
 */
public class ReportPageExample extends ReportPage<ReportExampleParameter> {

    @SpringBean
    private ReportExampleCreator reportCreator;

    /**
     * {@inheritDoc}
     */
    @Override
    protected void addSearchFields(WebMarkupContainer container) {
        container.add(this.createTextField("mnemonico"));
        container.add(this.createDateField("data"));
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected ReportCreator<ReportExampleParameter> getReportCreator() {
        return this.reportCreator;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected ReportExampleParameter createReportParameter() {
        return new ReportExampleParameter();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected MessageCreator getHelpTextCreator() {
        return new MockMessageCreator();
    }
}